<template>
  <div class="about">
    <h1>This is an about page</h1>
    <button @click="getList"> button </button>
    <button @click="add"> buttt </button>
    <ul>
      <!-- <li v-if="(item, index) in list" :key="index">
        <img :src="item.image" />
      </li> -->
    </ul>
  </div>
</template>

<script>
// import { get,post } from '../utils/fetch'

export default ({
  name:'about',
  list:[],
  methods: {
    async getList(){
      const data = await this.aGet('/admin/shopList');
      console.log('data',data)
      this.list = data
    },
    async add(){
      // let params = {
      //   name:'1221',
      //   price:'50',
      //   Image:'2323232323'
      // }
      const data = await this.aPost('/admin/shopitem',{
        name:'1221',
        price:'50',
        Image:'2323232323'
      });
      console.log(data)
    }
  }
})
</script>
